#ifndef UHM_WRAPPER_FORT_UTIL_HXX
#define UHM_WRAPPER_FORT_UTIL_HXX


// name mangling
#define UHM_C2F(name) name ## _

typedef std::pair<long,long> F_ptr;
typedef void                 F_void;

typedef char                 F_char;
typedef bool                 F_bool;
typedef int                  F_int;
typedef unsigned int         F_uint;
typedef long                 F_long;
typedef double               F_double;

extern "C" {
  // ** Util
  extern F_void UHM_C2F(uhm_initialize)(const F_char *);
  extern F_void UHM_C2F(uhm_finalize)();

  extern F_void UHM_C2F(uhm_hold)();

  extern F_void UHM_C2F(uhm_stopwatch)(F_double *t);

  extern F_void UHM_C2F(uhm_time_begin)(F_int *level);
  extern F_void UHM_C2F(uhm_time_end)();
  extern F_void UHM_C2F(uhm_time_stack_size)(F_int *size);
  extern F_void UHM_C2F(uhm_time_flush)();

  extern F_void UHM_C2F(uhm_time_in)();
  extern F_void UHM_C2F(uhm_time_out)(F_double *t);

  extern F_void UHM_C2F(uhm_storage_counter_reset)();
  extern F_void UHM_C2F(uhm_storage_counter)(F_double *storage, F_double *max_storage);

  extern F_void UHM_C2F(uhm_option_begin)();
  extern F_void UHM_C2F(uhm_option_end)();

  extern F_void UHM_C2F(uhm_verbose_begin)();
  extern F_void UHM_C2F(uhm_verbose_end)();

  extern F_void UHM_C2F(uhm_get_verbose)(F_int *verbose);
  extern F_void UHM_C2F(uhm_get_num_threads)(F_int *nthreads);

  extern F_void UHM_C2F(uhm_get_option_bool)(const F_char *opt, const F_char *text,
                                             F_bool *def, F_bool *val);
  extern F_void UHM_C2F(uhm_get_option_int)(const F_char *opt, const F_char *text,
                                            F_int *def, F_int *val);
  extern F_void UHM_C2F(uhm_get_option_double)(const F_char *opt, const F_char *text,
                                               F_double *def, F_double *val);

}

#endif
